const format = require('./format');
const db = require('./mongodb')


let trace = function(mongo,obj){
   return db.insertOne(mongo,{...obj,...{type:'trace',create:new Date()}});
}
let info = function(obj){
    return db.insertOne(mongo, {...obj,...{type:'info',create:new Date()}});
}
let error = function(obj){
    return db.insertOne(mongo, {...obj,...{type:'error',create:new Date()}});
}


module.exports.trace = trace;
module.exports.info = info;
module.exports.error =  error;
